<?php

namespace app\api\controller;

use app\api\BaseController;
use app\model\AdminModel;
use app\model\UserModel;

class Index extends BaseController
{
    public function index()
    {
//        $params = $this->request->param();
        $userId = $this->request->userInfo['userId'];
        $userModel = UserModel::find($userId);
        $adminModel = AdminModel::find($userModel->admin_id);

        return show(['adminName' => $adminModel->username]);

        //

    }

}